<%@ include file = "templates/header.jsp" %>

<h1>
Welcome to YawRiats!!!
</h1>
<%
String firstname = "";
String lastname = "";
String mi = "";
String username = "";
String address = "";
String phone = "";

if(request.getParameter("errorID")!=null)
{
	String errorID= request.getParameter("errorID");
	out.println("<b> Error </b>");
	if(errorID.trim().equals("1"))
	{
	%>
		<div style="color:red"> Password do not match </div> <br />
	<%
	}

 firstname = request.getParameter("firstname");
 mi = request.getParameter("mi");
 lastname = request.getParameter("lastname");

  username = request.getParameter("username");


 address = request.getParameter("address");
 phone = request.getParameter("phone");
}
%>
<form action = "process.jsp" method = "post">

Firstname	: 	<input type = "text" name = "firstname" value ="<%=firstname %>" /><br/>
MI			:	<input type = "text" name = "mi" value ="<%=mi %>" /><br/>
Lastname	: 	<input type = "text" name = "lastname" value ="<%=lastname %>"/><br/><br/>
Username	:	<input type = "text" name = "username" value ="<%=username %>" /><br/>
Password	:  	<input type = "password" name = "password1"/> <br />
Confirm Password	:  	<input type = "password" name = "password2"/><br/><br/>

Address		:	<textarea name = "address"><%=address %></textarea><br/>
Phone		: 	<input type = "text" name = "phone" value ="<%=phone %>"/><br/>

<input type="submit" value = "submit" />
</form>
<%@ include file = "templates/footer.jsp" %>